<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>online</title>
</head>
<body>
  <script>

    var xhr = new XMLHttpRequest()
    var url = 'http://localhost:9200/test/testAjax';
    xhr.open('GET', url)

    xhr.send(null)

    // onload 是 HTML5 中提供的 XMLHttpRequest v2.0 定义的
    xhr.onload = function () {
      console.log(this.readyState)
      console.log(this.responseText)
    }

  </script>
</body>
</html>
